package com.atguigu.controller;

import com.alibaba.druid.pool.DruidDataSource;
import com.atguigu.properties.DataSourceProperties;
import com.atguigu.properties.DataSourceProperties02;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.sql.DataSource;
import javax.xml.ws.RespectBinding;

/**
 * @author DongYu Zhou
 * @date 2022/5/30 17:43
 */
@RestController
@RequestMapping("/hello")
public class HelloControlle {

//    @Autowired
//    private DataSourceProperties dataSourceProperties;
//    @Autowired
//    private DataSourceProperties02 dataSourceProperties02;
    @Autowired
    private DataSource dataSource;


    @RequestMapping("hello")
    public String hello(String name){
//        System.out.println(dataSourceProperties);
//        System.out.println(dataSourceProperties02);
        System.out.println(dataSource.getClass());


        return "hello"+name;

    }
}
